/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package eu.easyedu.dictionary.explorer.actions;

import eu.easyedu.dictionary.api.resources.Bundle;
import eu.easyedu.dictionary.api.util.ConnectionDoesNotExistsException;
import eu.easyedu.dictionary.api.util.DictionaryManager;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import org.openide.util.Exceptions;

/**
 *
 * @author hlavki
 */
public class AddDictionaryAction extends AbstractAction {

    private static final long serialVersionUID = 1L;

    public AddDictionaryAction() {
        String name = Bundle.getMessage("AddDictionaryAction.name");
        putValue(NAME, name);
    }

    public void actionPerformed(ActionEvent e) {
        try {
            DictionaryManager.getDefault().showAddDictionaryDialog();
        } catch (ConnectionDoesNotExistsException ex) {
            Exceptions.printStackTrace(ex);
        }
    }
}
